<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加按钮菜单</title>
<%@ include file="/view/common/tags.jsp"%>
<link rel="stylesheet" href="${sysManagerV1}/content/plugins/bootstrap-table/bootstrap-table.css"> 
<style type="text/css">
.layui-layer-btn{position: fixed;width: 100%;bottom: 0px;}
.layui-layer-btn .layui-layer-btn0{border: 0px;border-radius: 2px;height: 28px;line-height: 28px;margin: 0 6px;padding: 0 15px;border: 1px #dedede solid;}
.layui-layer-btn .layui-layer-btn1{height: 28px;line-height: 28px;margin: 0 6px;padding: 0 15px;border: 1px #dedede solid;background-color: #f1f1f1;color: #333;
    border-radius: 2px;font-weight: 400;cursor: pointer;} 
</style>
</head>
<body>
	<div class="well well_p" >
		<sk:form method="post" cssClass="form-horizontal" id="saveAndUpdateFrom" target="_parent" action="${sysManagerV1}/menu/add.do"  >
			<!-- <fieldset> -->
				<c:if test="${addType == 0}">
					<div class="form-group">
						<label class="col-xs-3 text-right">所属菜单:</label>
						<div class="col-xs-7">
							<select class="form-control" id="parentId" name="parentId" disabled="disabled">
                                 <option value="${menuInfo.rowId}"  >${menuInfo.menuName}</option>
                             </select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-3 text-right">按钮名称:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="menuName" id="menuName"  placeholder="请输入名称">
							<input type="hidden" class="form-control" name="parentId" id="parentId"  value="${menuInfo.rowId}">
							<input type="hidden" class="form-control" name="menuFlag" id="menuFlag"  value="0">
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-3 text-right">排序编号:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="orderNum" id="orderNum"  placeholder="请输入排序编号">
						</div>
					</div>
					<div class="form-group" >
						<label class="col-xs-3 text-right">按钮图标:</label>
						<div class="col-xs-7">
							 <ul id="be-select" tabindex="0" >
								<li>请选择菜单图标</li>
								<li><span class="glyphicon glyphicon-home" aria-hidden="true"></span>glyphicon glyphicon-home</li>
								<li><span class="glyphicon glyphicon-user" aria-hidden="true"></span>glyphicon glyphicon-user</li>
								<li><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>glyphicon glyphicon-th-list</li>
								<li><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>glyphicon glyphicon-cog</li>
								<li><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span>glyphicon glyphicon-credit-card</li>
								<li><span class="glyphicon glyphicon-picture" aria-hidden="true"></span>glyphicon glyphicon-picture</li>
							</ul>
						</div>
						<input id="icon" name="icon" type="hidden"/>
					</div>
					<div class="form-group" >
						<label class="col-xs-3 text-right">按钮描述:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="menuDesc" id="menuDesc"  placeholder="请输入按钮描述">
						</div>
					</div>
				</c:if>
				<c:if test="${addType == 1 }">
					<div class="form-group">
						<label class="col-xs-3 text-right">类型:</label>
						<div class="col-xs-7">
							<select class="form-control" id="menuFlag" name="menuFlag"  onchange="changeType($(this).val());">
                                 <option value="1">一级菜单</option>
                                 <option value="2" selected >二级菜单</option>
                             </select>
						</div>
					</div>
					<div class="form-group"  id="parentIdDiv">
						<label class="col-xs-3 text-right">所属菜单:</label>
						<div class="col-xs-7">
                        	 <sk:select cssClass="form-control select" name="parentId" id="parentId" value="${menuInfo.parentId}"  >
                                 <sk:options options="${parentNodes}" />
                             </sk:select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-3 text-right">菜单名称:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="menuName" id="menuName"  placeholder="请输入菜单名称">
						</div>
					</div>
					<div class="form-group" >
						<label class="col-xs-3 text-right">菜单图标:</label>
						<div class="col-xs-7">
							 <ul id="be-select" tabindex="0" >
								<li>请选择菜单图标</li>
								<li><span class="glyphicon glyphicon-home" aria-hidden="true"></span>glyphicon glyphicon-home</li>
								<li><span class="glyphicon glyphicon-user" aria-hidden="true"></span>glyphicon glyphicon-user</li>
								<li><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>glyphicon glyphicon-th-list</li>
								<li><span class="glyphicon glyphicon-cog" aria-hidden="true"></span>glyphicon glyphicon-cog</li>
								<li><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span>glyphicon glyphicon-credit-card</li>
								<li><span class="glyphicon glyphicon-picture" aria-hidden="true"></span>glyphicon glyphicon-picture</li>
							</ul>
						</div>
						<input id="icon" name="icon" type="hidden"/>
					</div>
					<div class="form-group" id="menuUrlDiv">
						<label class="col-xs-3 text-right">链接路径:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="url" id="url"  placeholder="请输入链接路径">
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-3 text-right">排序编号:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="orderNum" id="orderNum"  placeholder="请输入排序编号">
						</div>
					</div>
					<div class="form-group" >
						<label class="col-xs-3 text-right">菜单描述:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" name="menuDesc" id="menuDesc"  placeholder="请输入菜单描述">
						</div>
					</div>
				</c:if>
				<input type="hidden" id="addType" name="addType" value="${addType}" >
				<input type="hidden" id="isReCommit" value="0">
				<div class="layui-layer-btn" >
					<button type="button" class="layui-layer-btn0" id="i"  onclick="add();" >添加</button>
					<button type="button" class="layui-layer-btn1" onclick="closeThis();">关闭</button>
				</div>
		</sk:form>
	</div>
</body>
<%@ include file="/view/common/footer.jsp"%>
<script type="text/javascript" src="${sysManagerV1}/view/js/system/menu_add.js"></script>
</html>